Socket
Socket
Sign inDemoInstall

@hapi/address

Package Overview
Dependencies
1
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hapi/address

Email address and domain validation


Version published
Weekly downloads
2.2M
decreased by-0.03%
Maintainers
1
Created
Weekly downloads
 

Package description

What is @hapi/address?

The @hapi/address package is a utility library developed as part of the hapi.js framework. It is primarily used for validating and manipulating email and domain addresses. It provides robust validation techniques, ensuring that email and domain inputs conform to standards and are valid for use in various applications.

What are @hapi/address's main functionalities?

Email Validation

This feature allows developers to validate email addresses to ensure they meet specific criteria for a valid email format. The code sample demonstrates how to validate an email address using the isValid method.

const Address = require('@hapi/address');
const email = 'example@example.com';
const result = Address.email.isValid(email);
console.log(result); // outputs: true

Domain Validation

This feature enables the validation of domain names to ensure they are correctly formatted and valid. The code sample shows how to check the validity of a domain using the isValid method.

const Address = require('@hapi/address');
const domain = 'example.com';
const result = Address.domain.isValid(domain);
console.log(result); // outputs: true

Other packages similar to @hapi/address

Readme

Source

@hapi/address

Validate email address and domain.

address is part of the hapi ecosystem and was designed to work seamlessly with the hapi web framework and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out hapi � they work even better together.

Visit the hapi.dev Developer Portal for tutorials, documentation, and support

Useful resources

Keywords

FAQs

Last updated on 06 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc